# $Id: PKGBUILD 179976 2013-03-13 18:06:41Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>

pkgname=xchm
pkgver=1.22
pkgrel=1
pkgdesc="A cross-platform GUI front-end to chmlib"
arch=('i686' 'x86_64')
url="http://xchm.sourceforge.net/"
license=('GPL')
depends=('chmlib' 'wxgtk' 'desktop-file-utils')
install=xchm.install
source=("http://downloads.sourceforge.net/sourceforge/xchm/${pkgname}-${pkgver}.tar.gz"
        'xchm.desktop'
        'xchm.xml')
md5sums=('3856ec4e6e54a80d0811707975fc8995'
         '31fb9692b9ee9f2a205f58b9ff4bc4fe'
         '4102b0a393f5c60236143cc034664dd0')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR=${pkgdir} install
  install -D -m644 ${srcdir}/xchm.desktop "${pkgdir}/usr/share/applications/xchm.desktop"
  install -D -m644 ${srcdir}/xchm.xml "${pkgdir}/usr/share/mime/packages/xchm.xml"
}
